package com.dcw.lixb.designmode.command;

import java.util.ArrayList;
import java.util.List;

/**
 * @author lixiaobin
 * @date 2020-07-23 17:03:05
 * @desc 描述信息
 */
public class Broker {
    private List<Order> mOrderList = new ArrayList<>();

    public void takeOrder(Order order) {
        mOrderList.add(order);
    }

    public void placeOrders() {
        for (Order order : mOrderList) {
            order.execute();
        }
        mOrderList.clear();
    }
}
